package com.itheima.Jiuye06;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class Zuoye04 {
    //四:已知字符串 2018-03-04 请通过代码转换为 2018年03月04日 且输出到控制台
    public static void main(String[] args) {
        String s = "2018-03-04";
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        LocalDate parse = LocalDate.parse(s, dateTimeFormatter);
        DateTimeFormatter date = DateTimeFormatter.ofPattern("yyyy年MM月dd日");
        String format = date.format(parse);
        System.out.println(format);
    }
}
